Optimal. Leaf size=62 \[ \frac{\tan (e+f x)}{2 f \sqrt{a \cos ^2(e+f x)}}-\frac{\cos (e+f x) \tanh ^{-1}(\sin (e+f x))}{2 f \sqrt{a \cos ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.119355, antiderivative size = 62, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3176, 3207, 2611, 3770} \[ \frac{\tan (e+f x)}{2 f \sqrt{a \cos ^2(e+f x)}}-\frac{\cos (e+f x) \tanh ^{-1}(\sin (e+f x))}{2 f \sqrt{a \cos ^2(e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3176
Rule 3207
Rule 2611
Rule 3770
Rubi steps
\begin{align*} \int \frac{\tan ^2(e+f x)}{\sqrt{a-a \sin ^2(e+f x)}} \, dx &=\int \frac{\tan ^2(e+f x)}{\sqrt{a \cos ^2(e+f x)}} \, dx\\ &=\frac{\cos (e+f x) \int \sec (e+f x) \tan ^2(e+f x) \, dx}{\sqrt{a \cos ^2(e+f x)}}\\ &=\frac{\tan (e+f x)}{2 f \sqrt{a \cos ^2(e+f x)}}-\frac{\cos (e+f x) \int \sec (e+f x) \, dx}{2 \sqrt{a \cos ^2(e+f x)}}\\ &=-\frac{\tanh ^{-1}(\sin (e+f x)) \cos (e+f x)}{2 f \sqrt{a \cos ^2(e+f x)}}+\frac{\tan (e+f x)}{2 f \sqrt{a \cos ^2(e+f x)}}\\ \end{align*}
Mathematica [A] time = 0.0451097, size = 43, normalized size = 0.69 \[ \frac{\tan (e+f x)-\cos (e+f x) \tanh ^{-1}(\sin (e+f x))}{2 f \sqrt{a \cos ^2(e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 1.423, size = 65, normalized size = 1.1 \begin{align*}{\frac{1}{f\cos \left ( fx+e \right ) } \left ({\frac{\sin \left ( fx+e \right ) }{2}}+{\frac{ \left ( \ln \left ( -1+\sin \left ( fx+e \right ) \right ) -\ln \left ( 1+\sin \left ( fx+e \right ) \right ) \right ) \left ( \cos \left ( fx+e \right ) \right ) ^{2}}{4}} \right ){\frac{1}{\sqrt{a \left ( \cos \left ( fx+e \right ) \right ) ^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.73306, size = 711, normalized size = 11.47 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.68546, size = 173, normalized size = 2.79 \begin{align*} -\frac{\sqrt{a \cos \left (f x + e\right )^{2}}{\left (\cos \left (f x + e\right )^{2} \log \left (-\frac{\sin \left (f x + e\right ) + 1}{\sin \left (f x + e\right ) - 1}\right ) - 2 \, \sin \left (f x + e\right )\right )}}{4 \, a f \cos \left (f x + e\right )^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan ^{2}{\left (e + f x \right )}}{\sqrt{- a \left (\sin{\left (e + f x \right )} - 1\right ) \left (\sin{\left (e + f x \right )} + 1\right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.45832, size = 228, normalized size = 3.68 \begin{align*} \frac{\frac{\log \left ({\left | \frac{1}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )} + \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 2 \right |}\right )}{\mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 1\right )} - \frac{\log \left ({\left | \frac{1}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )} + \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 2 \right |}\right )}{\mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 1\right )} - \frac{4 \,{\left (\frac{1}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )} + \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )\right )}}{{\left ({\left (\frac{1}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )} + \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )\right )}^{2} - 4\right )} \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 1\right )}}{4 \, \sqrt{a} f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]